package com.atomic.test.example.repository;

import com.atomic.test.example.entity.Post;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

/**
 * @author dreamyao
 * @title
 * @date 2021/11/10 7:13 下午
 * @since 1.0.0
 */
public interface PostRepository extends JpaRepository<Post,Integer> {

    List<Post> getPostByPostTypeAndPostTitle(Integer postType, String postTitle);

    List<Post> getPostByPostTitle(String postTitle);

    Page<Post> getPostByPostType(Integer postType, Pageable pageable);

    void deletePostByPostTitle(String postTitle);
}
